//
//  HWTuWenView.m
//  HappyWeekend
//
//  Created by lanou on 16/1/13.
//  Copyright © 2016年 com.mjykj.www. All rights reserved.
//

#import "HWTuWenView.h"

@implementation HWTuWenView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor whiteColor];
        _pictureButton = [UIButton buttonWithType:(UIButtonTypeCustom)];
        _pictureButton.frame = CGRectMake(0, 0, frame.size.width/ 2, frame.size.height);
        [_pictureButton setTitleColor:[UIColor blackColor] forState:(UIControlStateNormal)];
        [_pictureButton setTitle:@"图文介绍" forState:(UIControlStateNormal)];
        _pictureButton.layer.borderWidth = 1;
        _pictureButton.layer.borderColor = [UIColor grayColor].CGColor;
        [self addSubview:_pictureButton];
        
        _pLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, _pictureButton.height - 2, _pictureButton.width, 2)];
        _pLabel.backgroundColor = [UIColor colorWithRed:58.0f / 255.0f green:201.0f / 255.0f blue:187.0f / 255.0f alpha:1];
        [self addSubview:_pLabel];
        
        _commentButton = [UIButton buttonWithType:(UIButtonTypeCustom)];
        _commentButton.frame = CGRectMake(_pictureButton.width, 0, frame.size.width/ 2, frame.size.height);
        [_commentButton setTitleColor:[UIColor blackColor] forState:(UIControlStateNormal)];
        _commentButton.layer.borderWidth = 1;
        _commentButton.layer.borderColor = [UIColor grayColor].CGColor;
        [self addSubview:_commentButton];
        
        _cLabel = [[UILabel alloc] initWithFrame:CGRectMake(_pictureButton.width, _pictureButton.height - 2, _pictureButton.width, 2)];
        _cLabel.backgroundColor = [UIColor colorWithRed:58.0f / 255.0f green:201.0f / 255.0f blue:187.0f / 255.0f alpha:1];
        _cLabel.hidden = YES;
        [self addSubview:_cLabel];

    }
    return self;
}

@end
